using System;
using System.ComponentModel.DataAnnotations;

namespace UwinEducation.Application.Dtos.Orders
{
    /// <summary>
    /// 订单折扣数据传输对象
    /// </summary>
    public class OrderDiscountDto
    {
        /// <summary>
        /// 订单折扣ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        public Guid OrderId { get; set; }

        /// <summary>
        /// 折扣金额
        /// </summary>
        public decimal DiscountAmount { get; set; }

        /// <summary>
        /// 折扣描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderNumber { get; set; }
        public string OrderStatus { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreatorName { get; set; }
    }

    /// <summary>
    /// 创建订单折扣的数据传输对象
    /// </summary>
    public class CreateOrderDiscountDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        [Required]
        public Guid OrderId { get; set; }

        /// <summary>
        /// 折扣金额
        /// </summary>
        [Required]
        [Range(0.01, double.MaxValue, ErrorMessage = "折扣金额必须大于0")]
        public decimal DiscountAmount { get; set; }

        /// <summary>
        /// 折扣描述
        /// </summary>
        [Required]
        [StringLength(200, ErrorMessage = "描述长度不能超过200个字符")]
        public string Description { get; set; }
    }

    /// <summary>
    /// 更新订单折扣的数据传输对象
    /// </summary>
    public class UpdateOrderDiscountDto
    {
        /// <summary>
        /// 订单折扣ID
        /// </summary>
        [Required]
        public Guid Id { get; set; }

        /// <summary>
        /// 折扣金额
        /// </summary>
        [Required]
        [Range(0.01, double.MaxValue, ErrorMessage = "折扣金额必须大于0")]
        public decimal DiscountAmount { get; set; }

        /// <summary>
        /// 折扣描述
        /// </summary>
        [Required]
        [StringLength(200, ErrorMessage = "描述长度不能超过200个字符")]
        public string Description { get; set; }
    }
} 